/**
 * 
 */
package co.fitstart.payment.service;

import java.util.List;

import co.fitstart.payment.entity.request.RefundRecord;
import co.fitstart.payment.entity.transaction.TransactionRecord;

/**
 * @author lute
 *
 */
public interface RefundRecordService {

    /**
     * Create refund record
     * 
     * @param refundRecord
     */
    public void create(RefundRecord refundRecord);
    
    /**
     * Get all finished refund records of transaction record
     * 
     * @param transactionRecord
     * @return
     */
    public List<RefundRecord> getFinishedRefundRecords(TransactionRecord transactionRecord);
    
    /**
     * Refund successfully and update related records
     * 
     * @param refundNo  the refund number of refund record
     * @param refundId  the refund id from payment institution after refunding
     */
    public void refund(String refundNo, String refundId);

}
